package com.xmut.mall.manager.controller;

import com.xmut.mall.manager.annotation.CheckJwt;
import com.xmut.mall.manager.service.IndexStatisticsService;
import com.xmut.mall.manager.utils.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页统计数据
 */
@RestController
@RequestMapping("manager/statistics/index")
public class IndexStatisticsManagerController {

    @Autowired
    private IndexStatisticsService indexStatisticsService;

    /**
     * 获取当前后台待办事项
     * @return
     */
    @CheckJwt
    @GetMapping("/notice")
    public RespBean notice(){
        return indexStatisticsService.notice();
    }

    /**
     * 获取首页的具体数据
     * @return
     */
    @CheckJwt
    @GetMapping("/HomeData")
    public RespBean HomeData(){
        return indexStatisticsService.HomeData();
    }
}
